fix: guard GFD PCI vendor capability parsing against bad lengths - #1928
Open
amarkdotdev wants to merge 1 commit into
Open
fix: guard GFD PCI vendor capability parsing against bad lengths#1928amarkdotdev wants to merge 1 commit into
amarkdotdev wants to merge 1 commit into
Conversation
10 tasks
amarkdotdev
force-pushed
the
fix/gfd-pci-vendor-capability-bounds-1891
branch
2 times, most recently
from
July 21, 2026 19:24
d987de4 to
40d7682
Compare
Validate capability header and body bounds before slicing config space so malformed PCI data does not panic gpu-feature-discovery. Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
amarkdotdev
force-pushed
the
fix/gfd-pci-vendor-capability-bounds-1891
branch
from
July 27, 2026 20:29
40d7682 to
9abbec8
Compare
Author
|
Hey, same ask here. Waiting on CI workflow approval / first-time contributor vetting if a maintainer can kick that off. Thanks! |
|
Thanks for the contribution. We will review this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1891
GFD was panicking on at least one H100 node when it walked a vendor-specific PCI capability with a length that runs past the end of the config buffer.
The fix checks the capability header and body fit inside the config before slicing. Bad entries are skipped like any other broken capability chain instead of crashing the pod.
Added a unit test with a malformed config that used to trigger the panic.
Testing